//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Collections;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using CommunityServer.Components;
using CommunityServer.Controls;

namespace CommunityServer.Controls
{
	/// <summary>
	/// Summary description for TagBrowser.
	/// </summary>
	public class TagBrowser : TemplatedWebControl 
	{
		protected CSContext csContext = CSContext.Current;

		protected override void OnLoad(EventArgs e) 
		{
			base.OnLoad (e);

			this.DataBind();

			UsersOnline.SetLocation("Browsing posts by tags");

			if (csContext.Tags != null && csContext.Tags.Length > 0)
			{
				TitleBar.AddTagsToSearch(csContext.Tags, string.Format(ResourceManager.GetString("TagBrowser_SearchFilter"), string.Join(", ", csContext.Tags)), this.Context);
			}
		}

		protected override void AttachChildControls() 
		{
		}

		public override void DataBind() 
		{
			base.DataBind();
		}
	}
}
